15.9.2021

Überblick

  1. Motivation
  2. Inferenzstatistik
  3. Item Response Theorie
  4. Bayes’sche IRT in R
  5. Showroom: birtms
Was:
  • Methodik: Bayes’sche IRT-Modellierung
  • R-Package-Premiere: birtms
Was nicht:
  • fachdidaktische Erkenntnisse
  • birtms Tutorial
Link zum umfassenden Videotutorial folgt im Beitragsband
Was ich voraussetze:
  • Item Response Theorie
  • Interesse an Statistik

Motivation

  • Professionswissens von Chemie-Studierenden mit Lehramtsoption
  • deklarativ-fachdidaktischer Wissenstest
Itemstamm 059MC

Motivation

  • Professionswissens von Chemie-Studierenden mit Lehramtsoption
  • deklarativ-fachdidaktischer Wissenstest
Antwortoptionen 059MC

Motivation

  • Professionswissens von Chemie-Studierenden mit Lehramtsoption
  • deklarativ-fachdidaktischer Wissenstest
Antwortoptionen 059MC
Grafik aus Zhang, Miller & Cannady (2011)

Motivation

  • Professionswissens von Chemie-Studierenden mit Lehramtsoption
  • deklarativ-fachdidaktischer Wissenstest
  • Bayes’sches MIRT-Modell ab 100 Personen (Fujimoto & Neugebauer, 2020)
Biasreduzierender Effekt informativer Priors; Grafik aus Fujimoto & Neugebauer (2020)

Motivation

  • Professionswissens von Chemie-Studierenden mit Lehramtsoption
  • deklarativ-fachdidaktischer Wissenstest
  • Bayes’sches MIRT-Modell ab 100 Personen (Fujimoto & Neugebauer, 2020)
  • Bayes’sche IRT Modellierung mit brms (Bürkner, 2019)
Posterior Predictive Model Check (PPMC); Grafik aus Bürkner (2020)

Motivation

Shiny-App für den direkten Modellvergleich

Motivation

  • Professionswissens von Chemie-Studierenden mit Lehramtsoption
  • deklarativ-fachdidaktischer Wissenstest
  • Bayes’sches MIRT-Modell ab 100 Personen (Fujimoto & Neugebauer, 2020)
  • Bayes’sche IRT Modellierung mit brms (Bürkner, 2019)
  • Marginal Likelihood für Modellvergleiche (Merkle, Furr & Rabe-Hesketh, 2019)
Informationskriterien unter Nutzung der conditional und marginal likelihood; Grafik aus Merkle, Furr & Rabe-Hesketh (2019)

Inferenzstatistik

Grafik aus Kruschke & Liddell (2018)

Probleme mit NHST

  • abhängig von Datenerhebung/-auswertung
  • \(H_0\) oft quatsch
  • contra Nullhypothese \(\nLeftrightarrow\)
    pro Alternativhypothese
  • Effektstärke?
  • Informationsverlust
  • Interpretation
  • Meehls Paradoxon (Meehl, 1997)

Inferenzstatistik

Grafik aus Kruschke & Liddell (2018)

Probleme mit “new statistics”

  • abhängig von Datenerhebung/-auswertung
  • Parameterverteilung?
  • Meehls Paradoxon (Meehl, 1997)

Inferenzstatistik

Vorteile frequentistischer Methodik

  • Akzeptanz / Bekanntheit
  • eigener Wissensstand
  • Werkzeuge
    • Verfügbarkeit
    • Effizienz

Inferenzstatistik

Vorteile Bayes’scher Methodik

  • flexible Modellierung
  • valide für kleine Stichproben
  • Auswertung unabhängig von
    • Abschlusskriterium der Studie
    • Anzahl und Art der Tests
  • intuitive Interpretation
  • Vorwissen nutzbar
  • Parameterverteilung

Inferenzstatistik

Vorteile Bayes’scher Methodik

  • flexible Modellierung
  • valide für kleine Stichproben
  • Auswertung unabhängig von
    • Abschlusskriterium der Studie
    • Anzahl und Art der Tests
  • intuitive Interpretation
  • Vorwissen nutzbar
  • Parameterverteilung

Probleme Bayes’scher Methodik

  • Software-Verfügbarkeit
  • Hardwareanforderungen
Variable TAM brms
Zeit in s 0.06 138
Iterationen 36 4000 + 4000 + X
Speicher in MB 0.46 34.73
Werte je Parameter 3 4000

Inferenzstatistik

Vorteile Bayes’scher Methodik

  • flexible Modellierung
  • valide für kleine Stichproben
  • Auswertung unabhängig von
    • Abschlusskriterium der Studie
    • Anzahl und Art der Tests
  • intuitive Interpretation
  • Vorwissen nutzbar
  • Parameterverteilung

Probleme Bayes’scher Methodik

  • Software-Verfügbarkeit
  • Hardwareanforderungen
  • Kommunikationsaufwand
WAMBS-Checklist

Parameterverteilungen

i1_easyness <- brms::ranef(fit_1d_1pl_spm, summary = FALSE)$item[,"i1",1]
head(i1_easyness, n = 48) %>% round(2)
##  [1]  0.89  0.54  1.20  0.36  0.57  0.67  0.97  0.55  1.29  1.18  1.71  1.68
## [13]  2.05  1.36  1.22  1.41  1.46  1.15 -0.26  0.26  0.43  0.10  0.42  0.71
## [25]  0.51  0.80  1.07  1.16  1.26  0.90  0.85  0.29  0.10 -0.13  0.36  0.74
## [37]  0.20  1.10  0.82  0.28  0.01  0.38  1.09  0.94  0.24  0.13  0.27 -0.15
  • MCMC-Verfahren
  • Wahrscheinlichkeit(sdichte)
  • Breite \(\sim\) Unsicherheit
  • Unsicherheit in Folgeanalysen nutzbar
  • HDI als Basis für Inferenz
i1_easyness %>% birtms::plot_ppmc_distribution()

Parameterverteilungen

Grafik aus Kruschke (2015)

Grafiken mittels Code von Hyvönen & Tolonen (2019)

Item Response Theorie

  • latente Variablen
    • Personenfähigkeiten \(\theta_k\)
    • Itemparameter \(\beta_i, \alpha_i, \dots\)
  • logistisches Modell (GLM)
  • lokale Unabhängigkeit

Item Response Theorie

  • latente Variablen
    • Personenfähigkeiten \(\theta_k\)
    • Itemparameter \(\beta_i, \alpha_i, \dots\)
  • logistisches Modell (GLM)
  • lokale Unabhängigkeit
Raschmodell:

\[P\left(1|\theta_k, \beta_i\right)=\frac{\exp\left(\theta_k + \beta_i\right)}{1+\exp\left(\theta_k + \beta_i\right)}\]

Item Response Theorie

  • latente Variablen
    • Personenfähigkeiten \(\theta_k\)
    • Itemparameter \(\beta_i, \alpha_i, \dots\)
  • logistisches Modell (GLM)
  • lokale Unabhängigkeit
Raschmodell:

\[P\left(1|\theta_k, \beta_i\right)=\frac{\exp\left(\theta_k + \beta_i\right)}{1+\exp\left(\theta_k + \beta_i\right)}\]

Grafik aus Grottke, Möhrke & Marvin (2021)

Item Response Theorie

  • latente Variablen
    • Personenfähigkeiten \(\theta_k\)
    • Itemparameter \(\beta_i, \alpha_i, \dots\)
  • logistisches Modell (GLM)
  • lokale Unabhängigkeit
Raschmodell:

\[P\left(1|\theta_k, \beta_i\right)=\frac{\exp\left(\theta_k + \beta_i\right)}{1+\exp\left(\theta_k + \beta_i\right)}\]

Grafik aus Grottke, Möhrke & Marvin (2021)
Ausnahmen:
  • latente Regression
  • Testlets

Bayes’sche IRT-Modellierung in R

  1. Daten vorbereiten
  2. Modell formulieren
  3. Vorannahmen formulieren
  4. Modell fitten
data_spm_long <- data_spm %>%
  birtms::compose_dataset(
    response_columns = i1:i12)
(formula1PL <- birtms::build_formula())
## response ~ 1 + (1 | person) + (1 | item)
prior_1PL <- brms::prior("normal(0, 3)", class = "sd", group = "person") +
  brms::prior("normal(0, 3)", class = "sd", group = "item")
fit_1d_1pl_spm <- birtms::birtm(
  data = data_spm_long, formula = formula1PL, 
  prior = prior_1PL, file = "models/fit_1d_1pl_spm"
  )

Konvergenz prüfen

summary(fit_1d_1pl_spm, robust = TRUE)
##  Family: bernoulli 
##   Links: mu = logit 
## Formula: response ~ 1 + (1 | person) + (1 | item) 
##    Data: data (Number of observations: 5988) 
##   Draws: 4 chains, each with iter = 2000; warmup = 1000; thin = 1;
##          total post-warmup draws = 4000
## 
## Group-Level Effects: 
## ~item (Number of levels: 12) 
##               Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## sd(Intercept)     1.49      0.32     1.02     2.46 1.00     1193     2063
## 
## ~person (Number of levels: 499) 
##               Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## sd(Intercept)     1.68      0.08     1.54     1.85 1.00     1561     2524
## 
## Population-Level Effects: 
##           Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## Intercept     1.05      0.43     0.18     2.02 1.01      682     1213
## 
## Draws were sampled using sampling(NUTS). For each parameter, Bulk_ESS
## and Tail_ESS are effective sample size measures, and Rhat is the potential
## scale reduction factor on split chains (at convergence, Rhat = 1).

Konvergenz prüfen

bayesplot::mcmc_trace(
  fit_1d_1pl_spm, pars = c("b_Intercept")
  )

Grafik von Clark (2018)

birtms-Featurelist

Itemchecks:
  • Itemparameterverteilungen
  • Item Characteristic Curves
  • Posterior Predictive Model Checks

Itemchecks

Itemchecks

g_spm_2pl <- birtms::ICC_check(
  fit_1d_2pl_spm, post_responses = posterior_responses_spm_2pl,
  num_groups = 6, item_id = 12, ellipse_type = "axisparallel")

birtms-Featurelist

Itemchecks:
  • Itemparameterverteilungen
  • Item Characteristic Curves
  • Itemfit
Modellvergleiche:
  • marginal loo-cv
  • Itemweise:
    • PPMC
    • Odds-Ratios
    • ICCs

Modellvergleiche

leave-one-out crossvalidation

marg_loo1pl <- birtms::loo_marginal(fit_1d_1pl_spm)
marg_loo2pl <- birtms::loo_marginal(fit_1d_2pl_spm)
loo::loo_compare(marg_loo1pl, marg_loo2pl)
##        elpd_diff se_diff
## model2   0.0       0.0  
## model1 -25.4      11.1

Modellvergleiche

Posterior Predictive Model Checks

Modellvergleiche

Odds-ratio PPMC

ordata_1pl_spm_fullbayes %>% 
  birtms::plot_ppmc_or_heatmap()
ordata_2pl_spm_fullbayes %>% 
  birtms::plot_ppmc_or_heatmap()

Modellvergleiche

Odds-ratio-Limit-Check

ordata_2pl_spm_fullbayes %>% 
  birtms::plot_or_heatmap(
    model = fit_1d_2pl_spm)
ordata_2pl_spm_fullbayes %>% 
  birtms::plot_or_heatmap(
    model = fit_1d_2pl_spm, bayesian = TRUE)

birtms-Featurelist

Itemchecks:
  • Itemparameterverteilungen
  • Item Characteristic Curves
  • Itemfit
Modellvergleiche:
  • marginal loo-cv
  • Itemweise:
    • PPMC
    • Odds-Ratios
    • ICCs
latente Regression:
  • Parameterverteilungen
  • bayes’sche Variante des \(R^2\)-Bestimmtheitsmaß
Personchecks:
  • Person Response Functions
  • Personfit
Sonstiges:
  • Wrightmap

birtms-Featurelist

Itemchecks:
  • Itemparameterverteilungen
  • Item Characteristic Curves
  • Itemfit
Modellvergleiche:
  • marginal loo-cv
  • Itemweise:
    • PPMC
    • Odds-Ratios
    • ICCs
latente Regression:
  • Parameterverteilungen
  • bayes’sche Variante des \(R^2\)-Bestimmtheitsmaß
Personchecks:
  • Person Response Functions
  • Personfit
Sonstiges:
  • Wrightmap

birtms-Featurelist

Itemchecks:
  • Itemparameterverteilungen
  • Item Characteristic Curves
  • Itemfit
Modellvergleiche:
  • marginal loo-cv
  • Itemweise:
    • PPMC
    • Odds-Ratios
    • ICCs
latente Regression:
  • Parameterverteilungen
  • bayes’sche Variante des \(R^2\)-Bestimmtheitsmaß
Personchecks:
  • Person Response Functions
  • Personfit
Sonstiges:
  • Wrightmap

Schluss

Bitte

  • um Nutzung
  • um Bugreport
  • um Fragen
  • um Feedback

Schluss

Bitte

  • um Nutzung
  • um Bugreport
  • um Fragen
  • um Feedback
  • um Austausch
  • um Zusammenarbeit
  • um kritischen Prüfung

Schluss

Wrightmap

fit_1d_1pl_spm %>% birtms::plot_wrightmap(classic = FALSE)

conditional and marginal loo-cv

conditional loo
marginal loo

crossvalidation methods

Alternativen
  • grouped k-fold crossvalidation
  • Bayes Factor via bridgesampling

Ausblick

Funktionalitäten

  • testlets
  • Shiny-App
  • 3pl
  • Itemkriterien (vgl. Scharl & Gnambs, 2019)
  • hierarchic
  • ordinal
  • multidim
  • multivariate
  • 4pl
  • noncompensatory

Paket

  • Dokumentation
  • Vignetten
  • Videotutorials
  • Performance
  • Vereinheitlichung
  • Abhängigkeiten reduzieren
  • Mehrsprachigkeit

Sampling

EM Algorithmus

  • Start: Itemschwierigkeit \(\sim\) Lösungshäufigkeit
  • bis zur Konvergenz:
    • Wähle SD der random effect Verteilung
    • Wähle random effect Werte
    • maximiere die Likelihood
      • analytisch oder per Newton-Verfahren
      • effektiv für weniger Dimensionen
  • Präsentiere beste Punktschätzer
  • Präsentiere Schätze CI

MCMC Algorithmus

  • Burn-in / warmup-Pahse
  • Sampling-Phase
  • Präsentiere Postsamples
  • Deskriptive Statistik der Postsamples
Schritte:
  • Wähle Parameter in der Imgebung
  • berechne Likelihood
    • besser: akzeptiere Werte
    • schlechter: werfe biased Münze
      • Kopf: akzeptiere Werte
      • Zahl: verwerfe Werte, wähle neue

MCMC-Sampling-Applets

ROPE

Grafik aus Waning, Montagne, McCloskey & Maki (2001)

Literatur

Bürkner, P.-C. (2019). Bayesian Item Response Modeling in R with brms and Stan. Verfügbar unter: https://arxiv.org/pdf/1905.09501

Bürkner, P.-C. (2020). Analysing Standard Progressive Matrices (SPM-LS) with Bayesian Item Response Models. Journal of Intelligence, 8(1). https://doi.org/10.3390/jintelligence8010005

Clark, M. (2018). Bayesian Basics. Verfügbar unter: https://m-clark.github.io/bayesian-basics/diagnostics.html

Fujimoto, K. A. & Neugebauer, S. R. (2020). A General Bayesian Multidimensional Item Response Theory Model for Small and Large Samples. Educational and psychological measurement, 80(4), 665–694. https://doi.org/10.1177/0013164419891205

Grottke, T., Möhrke, P. & Marvin, R. (2021). Statistische Analysen mit R in den MINT-Didaktiken Eine Tutorial-Sammlung: 4 Praxisorientierte Einf ührung in die Item-Response-Theorie mit dem Fokus auf das Rasch-Modell. Verfügbar unter: https://dbuschhue.github.io/P4-Worflow/praxisorientierte-einf

Haberman, S. J., Holland, P. W. & Sinharay, S. (2007). Limits on Log Odds Ratios for Unidimensional Item Response Theory Models. Psychometrika, 72(4), 551–561. https://doi.org/10.1007/S11336-007-9009-0

Hyvönen, V. H. & Tolonen, T. (2019). Chapter 3 Summarizing the posterior distribution | Bayesian Inference 2019. Verfügbar unter: https://vioshyvo.github.io/Bayesian_inference/summarizing-the-posterior-distribution.html

Kruschke, J. K. (2015). Doing Bayesian data analysis: A tutorial with R, JAGS, and Stan (2. ed.). Amsterdam: AP Academic Press/Elsevier. Verfügbar unter: http://www.contentreserve.com/TitleInfo.asp?ID=38F45CF6-6B5C-433C-85F8-A3568420927D&Format=50

Kruschke, J. K. & Liddell, T. M. (2018). The Bayesian New Statistics: Hypothesis testing, estimation, meta-analysis, and power analysis from a Bayesian perspective. Psychonomic Bulletin & Review, 25(1), 178–206. https://doi.org/10.3758/s13423-016-1221-4

Kruschke, J. K. & Liddell, T. M. (2018). The Bayesian New Statistics: Hypothesis testing, estimation, meta-analysis, and power analysis from a Bayesian perspective. Psychonomic Bulletin & Review, 25(1), 178–206. https://doi.org/10.3758/s13423-016-1221-4

Meehl, P. E. (1997). The Problem Is Epistemology, Not Statistics: Replace Significance Tests by Confidence Intervals and Quantify Accuracy of Risky Numerical Predictions (Multivariate Applications Series). In L.L. Harlow, S.A. Mulaik & J.H. Steiger (Hrsg.), What If There Were No Significance Tests? (S. 393–425). Hoboken: Taylor and Francis. Verfügbar unter: https://meehl.umn.edu/sites/meehl.umn.edu/files/files/169problemisepistemology.pdf

Merkle, E. C., Furr, D. & Rabe-Hesketh, S. (2019). Bayesian Comparison of Latent Variable Models: Conditional Versus Marginal Likelihoods. Psychometrika, 84(3), 802–829. https://doi.org/10.1007/s11336-019-09679-0

Scharl, A. & Gnambs, T. (2019). Longitudinal item response modeling and posterior predictive checking in R and Stan. The Quantitative Methods for Psychology, 15(2), 75–95. https://doi.org/10.20982/tqmp.15.2.p075

Waning, B., Montagne, M., McCloskey, W. W. & Maki, R. A. (2001). Pharmacoepidemiology: Principles and practice. New York: McGraw-Hill. Verfügbar unter: http://www.loc.gov/catdir/bios/mh041/00045207.html

Zhang, O., Miller, D. & Cannady, M. (2011). A Model Evaluation When Associations Exists Across Testlets under Small Testlet Size Situations. Verfügbar unter: https://ouzhang.me/pdf/2011NCME2_slide.pdf